﻿@{
    Layout = "~/Views/Shared/_Layout_Admin.cshtml";
}
@*<script src="../../js/jquery-ui/jquery.ui.datepicker.min.js" type="text/javascript"></script>
<script src="../../js/setup.js" type="text/javascript"></script>
<script src="../../js/table/jquery.dataTables.min.js" type="text/javascript"></script>*@<script
    src="../../Scripts/Evince_Script/jquery.ui.datepicker.min.js" type="text/javascript"></script>
<script type="text/javascript">
    function getdate() {
        var fromDateValue = $('#datePiker').val();
        var toDateValue = $('#datePiker1').val();
        
        
    }
    function GetAttendanceLog(attendanceId) {
        window.location = "/Attendance/ShowAttendanceDetail?attendanceId=" + attendanceId;
    }
    $(document).ready(function () {
        setDatePickerAttendance('datePiker');
        setDatePickerAttendance('datePiker1');
        var fromDateValue = $('#datePiker').val();
        var toDateValue = $('#datePiker1').val();
       
        // 
        $('#btnAttendance').click(function () {
           
            fromDateValue = $('#datePiker').val();
            toDateValue = $('#datePiker1').val();
            $.get('/Attendance/_AttendanceTable?fromDate=' + fromDateValue, '&toDate=' + toDateValue, function (data) {
                $("#attendanceTableDiv").html(data);
            });


        });

        $.get('/Attendance/_AttendanceTable?fromDate=' + fromDateValue, '&toDate=' + toDateValue, function (data) {
            $("#attendanceTableDiv").html(data);
        });







    });
    
</script>
<div class="grid_10" >
            <div class="box round first grid">
                <h2>Attendance</h2>
                <div class="block">
                    <label style="font-family:Times New Roman Baltic">From</label>
                    <input type="text" id="datePiker"  value="@DateTime.Now.ToString("MM/dd/yyyy")"/>
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     <label style="font-family:Times New Roman Baltic">To</label>
                      <input type="text" id="datePiker1" value="@DateTime.Now.ToString("MM/dd/yyyy")"/>
                     <button class="btn btn-orange" id="btnAttendance">Get Attendance</button>
                   <br />
                   <div id="attendanceTableDiv">
                   </div>
                   
                    
               

                 

                    
                </div>
            </div>
            
        </div>